module WWW
  class Ali
    class Taobao
      class Result
        attr_reader :success,:url
        attr_writer  :success,:url
      end
      class Tool
        #判断用户是否登录Taobao
        def Tool::is_login items
          login_valid = Result.new
          login_valid.success=true
          if items['code']!=nil && items['code'][0]=='1004'
            login_valid.url = items['url'][0]+"&sip_redirecturl="+WWW::Ali.get_isv_url_pre
            login_valid.success=false
          end
          return login_valid
        end
      end
    end
  end
end
